<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>双向绑定类型转换</title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" v-model.number="age"/><button @click="addnum()">+1</button><br>
			<input type="text" v-model.trim="name"/>{{name.length}}<br>
			<input type="text" v-model.lazy="msg"/>{{msg}}
		</div>
		<script>
		const app = new Vue({
			el:"#app",
			data:{
				age:'',
				name:'',
				msg:''
			},
			methods:{
				addnum(){
					this.age=this.age+1
				}
			}
		})
		</script>
	</body>
</html>
